Field of the Invention
Aspects of the present invention generally relate to an image forming apparatus for printing an image based on a file attached to an electronic mail (e-mail).
Description of the Related Art
There has been known an image forming apparatus having a function of receiving an e-mail from a mail server and printing an image based on a file attached to the received e-mail. The image forming apparatus having the above function can receive an e-mail from the mail server at a predetermined time or according to an instruction manually provided by a user. Further, there has been known that the above-described image forming apparatus deletes an e-mail stored in the mail server after receiving that e-mail. Japanese Patent Application Laid-Open No. 2002-152450 discusses an image forming apparatus that receives an e-mail and deletes that e-mail from a mail server after an image thereof has been printed.
If an e-mail is to be deleted after the image has been printed, it can take some time to delete the e-mail after reception. The time taken for deletion after reception of the e-mail is longer if the number of printing sheets is greater and time taken for printing is longer.
If it takes time to delete the e-mail after reception, a network failure may occur when the image is being printed after reception of the e-mail, so that the e-mail cannot be deleted from the mail server.
In a case where the e-mail cannot be deleted, the e-mail to be deleted may remain stored in the mail server. In such a case, if the image forming apparatus issues an inquiry to the mail server in order to receive a new e-mail after the network failure is solved, an e-mail corresponding to a printed image is received again, and the same image may be undesirably printed repeatedly.